package com.dao.lx;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.entity.Repairorder;

public interface RepairorderDAO extends JpaRepository<Repairorder, Long>{
	@Query("from Repairorder r where r.repairorderNumber like ?1% and r.repairorderIfdelete = 1")
	public Page<Repairorder> queryByRepairorderNumber(String repairorderNumber, Pageable p);
	
	@Query("from Repairorder r where r.repairorderSchedule like ?1 and r.repairorderIfdelete = 1")
	public Page<Repairorder> queryByRepairorderSchedule(String repairorderSchedule, Pageable p);
	
	@Query("from Repairorder r where r.repairorderReceivestate like ?1 and r.repairorderIfdelete = 1")
	public Page<Repairorder> queryByRepairorderReceivestate(String repairorderReceivestate, Pageable p);
	
	@Query("from Repairorder r where r.repairorderIfdelete = 1")
	public Page<Repairorder> findAllRepairorderIfdelete1(Pageable p);
}
